package data.content.visitor;

import data.content.ContentSentence;
import data.content.ContentStalkerJoin;
import data.content.ContentStalkerLeaves;
import data.datas.NoHistoryDatas;

public class UpdateNoHistoryDatasContentVisitor extends ContentVisitor<Void> {

  private final NoHistoryDatas datas_;
  
  public UpdateNoHistoryDatasContentVisitor(NoHistoryDatas datas) {
    assert datas != null;
    datas_ = datas;
  }
  
  @Override
  public Void visit(ContentSentence sentence) {
    assert sentence != null;
    return null;
  }

  @Override
  public Void visit(ContentStalkerJoin stalkerJoin) {
    assert stalkerJoin != null;
    datas_.join(stalkerJoin.getStalker());
    return null;
  }

  @Override
  public Void visit(ContentStalkerLeaves stalkerLeave) {
    assert stalkerLeave != null;
    datas_.leave(stalkerLeave.getStalker());
    return null;
  }

}
